/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vng.survey.controller;

import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 *
 * @author namhh
 */
public class RoutingController extends BaseController {

    @Override
    public String render(HttpServletRequest request, HttpServletResponse resp) throws IOException, Exception {
     return  showError("Không tìm thấy đường dẫn yêu cầu!");
    }

//    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
//            throws ServletException, IOException, Exception {
//        String pathInfo = request.getPathInfo();
//
//
//        String[] path = pathInfo.split("/"); //check null
//        if (path.length <= 2) {
//            String out = forwardError();
//            out(out, response);
//            return;
//        }
//        int startIndex = 0;
//        if ("".equals(path[0])) {
//            ++startIndex;
//        }
//        if (pathInfo.startsWith("/")) {
//            String fanpage = path[1];
//            String uri = path[2];
//            if (uri.equals("home")) {
//                forward(request, response, "/home/" + fanpage);
//            }
//            if (uri.equals("new")) {
//                forward(request, response, "/new/" + fanpage);
//            }
//            if (uri.startsWith("edit")) {
//                forward(request, response, "/edit/" + fanpage);
//            }
//            if (uri.startsWith("stat")) {
//                forward(request, response, "/stat/" + fanpage);
//            }
//            if (uri.startsWith("detail")) {
//                forward(request, response, "/detail/" + fanpage);
//            }
//            if (uri.startsWith("response")) {
//                forward(request, response, "/response/" + fanpage);
//            } else {
//                String out = forwardError();
//                out(out, response);
//            }
//        }




   // }
  


   

   

  
}
